<?php


function admin_url($path,$vars = [])
{
    $path = ltrim($path,'/');
    $path = "/admin/".$path;
    return url($path,$vars);
}



function GetRandStr($length){
    $str='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    $len=strlen($str)-1;
    $randstr='';
    for($i=0;$i<$length;$i++){
        $num=mt_rand(0,$len);
        $randstr .= $str[$num];
    }
    return $randstr;
}
